<%- include('header') %>

<div class="ui grid">
  <div class="four wide column">
    <a class="avatar" 
      href="/posts?author=<%= user._id %>"
      data-title="<%= user.name %> | <%= ({m: '男', f: '女', x: '保密'})[user.gender] %>"
      data-content="<%= user.bio %>">
      <img src="/img/<%= user.avatar %>" alt="" class="avatar">
    </a>
  </div>
  <div class="eight wide column">
    <form action="/posts/<%= post._id %>/edit" class="ui form segment" method="post">
      <div class="field required">
        <label for="">标题</label>
        <input type="text" name="title" value="<%= post.title %>">
      </div>
      <div class="field required">
          <label for="">内容</label>
          <textarea name="content" rows="15"><%= post.content %></textarea>
        </div>
        <input type="submit" class="ui button" value="发布">
    </form>
  </div>
</div>

<%- include('footer') %>